﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcBase
{
    public abstract class BaseRepository : IRepository
    {
        public abstract void Insert<E>(E entity) where E : class;

        public abstract void Update<E>(E entity) where E : class;

        public abstract void Delete<E>(E entity) where E : class;

        public int SaveChanges()
        {
            return SaveChanges(true);
        }

        public abstract int SaveChanges(bool validateEntities);

        public abstract IQueryable<E> Select<E>() where E : class;

        public abstract E Select<E>(object key) where E : class;

        public abstract void Dispose();
    }
}
